import request from '@/common/js/request.js';

// 医院列表
export const getHospitalListData = (data) => {
	return request.post('/api/statistics/hospitals', data);
};

// 根据医院id获取医生列表和 获取医生列表
export const getDoctorListData = (data) => {
	return request.post('/api/user/doctors', data);
};

// 添加医生
export const addDoctorData = (data) => {
	return request.post('/api/user/add_doctor', data);
};

//根据区域id查业务员
export const getSalesmanList = (data) => {
	return request.post('/api/user/yw_info', data);
};

// 试戴类型
export const getTryType = () => {
	return request.get('/api/index/try_config');
};

// 产品类别
export const SendGetProductType = (data) => {
	return request.post('/api/user/product_types', data);
};

// 产品列表
export const getProductList = (data) => {
	return request.post('/api/user/products', data);
};

// 获取牙色配置
export const getToothColor = (data) => {
	return request.post('/api/index/tooth_color', data);
};

// 设计要求
export const getDesignRequire = (data) => {
	return request.post('/api/index/deesign_requirements', data);
};

// 附件要求
export const getAttachmentRequire = (data) => {
	return request.post('/api/user/fitting_cates', data);
};

// 附件要求详情
export const getAttachmentRequireDetail = (data) => {
	return request.post('/api/user/fittings', data);
};

// 修改订单
export const SendUpdateForm = (data) => {
	return request.post('/api/user/edit_order_no_auth', data);
};

/**
 * @description  查询订单详情
 * @param {String} order_id
 * @returns
 */
export const getOrderDetailData = (id, download) => {
	return request.post('/api/user/order_info', { order_id: id, is_download: download });
};

/**
 * @description  查询订单详情
 * @param {String} order_id
 * @returns
 */
export const getOrderDetail = (data, download) => {
	return request.post('/api/user/order_info', data);
};

// 新增订单
export const sumbitform = (data) => {
	return request.post('/api/user/add_order_hehe', data);
};

/**
 * @description  获取模板配置
 * @param {*} params
 * @returns
 */
export const getPrintTemplate = (data) => {
	return request.post('/api/index/patient_print_config_info', data);
};

/**
 * @description 获取牙色配置
 */
export const getToothColorMap = (data) => {
	return request.post('/api/index/tooth_color_map', data);
};

/**
 * @description 获取要求配置
 */
export const getRequire = (data) => {
	return request.post('/api/index/deesign_requirements_map', data);
};

/**
 * @description 网络打印
 * @param {*} sn
 * @param {*} content
 * @returns
 */
export const webPrint = async (sn, content) => {
	return request.post('/api/index/huipeng', { sn, content });
};

/**
 * 通过设计单号获取医院
 * @param {*} data
 * @returns
 */
export const getDesignToHospital = (data) => {
	return request.post('/api/user/design_no_hospital', data);
};

/**
 * 快捷键查找产品
 */
export const getProductKeyList = (data) => {
	return request.post('/api/depot/products', data);
};

/**
 * 获取客户习惯
 */
export const getHabit = (data) => {
	return request.post('/api/user/product_habits', data);
};
